<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=script, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 全假为假，其他为真，返回第一个为真的值，如果全是假值，返回最后一个值
      console.log(1 || 0); // 1
      console.log(null || 1); //1
      console.log(null || 0 || 1); //1
      console.log(undefined || null || 0); //0
    </script>
  </body>
</html>
